<%= render 'common/notice' %>

<div class="panel-no-border panel-primary">
  <!-- Default panel contents -->
  <div class="panel-heading"><strong>标签: <%= @tag.name %></strong></div>
  <div class="panel-body">
    <div class="row gray-font-12">
      <div class="col-xs-12">
        父标签:
        <%- if @tag.root? %>
            <span class="mgl5">无</span>
        <%- else %>
            <span class="mgl5"><%= link_to @tag.parent.name, tag_path(@tag.parent) %></span>
        <% end %>
      </div>
      <div class="col-xs-12 mgt8">
        子标签:
        <%- if @tag.children.first %>
            <%- @tag.children.each do |child| %>
                <span class="mgl5"><%= link_to child.name, tag_path(child) %></span>
            <% end %>
        <%- else %>
            <span class="mgl5">无</span>
        <% end %>
      </div>
      <div class="col-xs-12 mgt8">
        <span>文章数量: <%= @topics.size %></span>
      </div>
      <div class="col-xs-12 mgt8">简介: <%= @tag.intro %></div>
    </div>
  </div>

  <%= render partial: 'topics/list_simple', locals:{ topics: @topics} %>


</div>